package net.bplaced.streetfighter.fragment;

import net.bplaced.streetfighter.R;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.LinearLayout;

/**
 * @author Sebastian Hoffmann <bo.hoffi@googlemail.com>
 */
public class HelpFragment
        extends Fragment {

    private LinearLayout view = null;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        this.view = (LinearLayout) inflater.inflate(R.layout.view_help, container, false);

        this.buildUpView(this.view);

        return this.view;
    }

    private void buildUpView(View parent) {

        final WebView webView = (WebView) parent.findViewById(R.id.help_view);
        webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
        webView.loadUrl("http://streetfighter.bplaced.net/filemanager/app/android/streetfighter_android_app_help.html");
    }
}